<?php
/**
 * User: lie
 * Date: 2020-11-05 20:16
 * description:
 */
    echo "<form action='048.php' method='post'>";
    echo "用户名: <input type='text' name='username'>";
    echo "<br>";
    echo "密码: <input type='password' name='pwd'>";
    echo "<br>";
    echo "<input type='submit' value='登录'>";
    echo "</form>";

    if ($_POST['username'] == '' || $_POST['pwd'] == ''){
        echo "用户名或密码不能为空,无法登录";
    } else if ($_POST['username'] == 'admin' && $_POST['pwd'] == 'admin'){
        echo "欢迎管理员";
    } else {
        echo "欢迎登录";
    }